how to solve consecutive integer problems